package baseFx.log;

import org.apache.logging.log4j.LogManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Test {
    public static void main(String[] args) {
        FxLog.singleFile = true;
        Logger logger = LoggerFactory.getLogger(Test.class);
        Logger logger2 = LoggerFactory.getLogger(FxLogSetting.class);
        FxLogSetting sout = FxLog.getConsoleSetting(logger.getName());
        sout.getLevels().add(Level.DEBUG);
        FxLogSetting file = FxLog.getFileSetting(logger.getName());
        System.out.println(file.getLevels());
        System.out.println(sout.getLevels());
        System.out.println(logger.isDebugEnabled());

        logger.info("信息");
        logger.debug("调试");
        logger.error("错误");
        logger.trace("追踪", new RuntimeException("666"));

        logger2.info("信息");
        logger2.debug("调试");
        logger2.error("错误");
        logger2.trace("追踪", new RuntimeException("666"));
    }
}
